home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINPROGS / STDM14.ZIP / README.TXT < prev    next >
Text File  |  1993-07-31  |  29KB  |  863 lines

  1.  
  2.             Stdemo Player 1.4 
  3.     Copyright (c) 1992,1993 Mik Kvitchko
  4.  
  5. -----------------------------
  6. | Mikhail Kvitchko          |
  7. | 361-A Crowells Road,      |
  8. | Highland Park, NJ 08904   |
  9. | USA                       |
  10. | mik@bhsw.com              |
  11. -----------------------------
  12.  
  13. This package consists of the following files:
  14.  
  15. HIST.TXT    - History of changes
  16. README.TXT    - This File
  17. SCRIPT.TXT    - Stdemo Player example script
  18. STDEMO.DIZ    - Stdemo Player short description.
  19. STDEMO.EXE    - Stdemo Player program
  20. STHOOK.DLL    - Stdemo Player DLL
  21.  
  22. What is this?
  23. =============
  24.  
  25. Stdemo Player is the multy-purpose application. First of all, you can 
  26. use it to create demos and tutorials. It allows you to write a script, 
  27. which will start one or several Windows application and perform a series 
  28. of keystrokes or mouse actions aimed to demonstrate these applications.
  29.  
  30. While your script is being "played", you can disable completely keyboard 
  31. and mouse, so that user will not be able to interfere with the running 
  32. demo and to cause a conflict. At certain points of you script you may 
  33. interrupt it in order to interact with user. These interactions allow:
  34.  
  35. -    to show the "text" box with some explanatory text before script 
  36.     will continue ( this is the main idea of how demos and tutorials 
  37.     are to be designed);
  38.  
  39. -    to show the "menu" box where user can select one of several 
  40.     choices, and therefore control the script's execution;
  41.  
  42. -    to show the "input" box, where user can answer questions and 
  43.     enter some text, which later can be used in script.
  44.  
  45. There are many varieties of these boxes in order to make your demo 
  46. flexible, and they can be forced to be shown in some convenient places 
  47. on the screen. Moreover, user can move them across the screen to be 
  48. able to see different parts of the covered windows.
  49.  
  50. Stdemo Player allows you even to play WAV files in order to make your
  51. tutorial better.
  52.  
  53. Even if you are not interested in preparing demos, you may find Stdemo 
  54. Player useful. For example, you can replace your complete Startup Group 
  55. with the single Stdemo Player script which will launch all your "startup" 
  56. applications, and even perform some initial actions for every of them: 
  57. set up default options, load files, etc.
  58.  
  59. Another feature allows you to automate your everyday chores (like backup, 
  60. etc. ) by using the sheduling abilities of Stdemo Player script language.
  61.  
  62. How to play the script?
  63. ======================
  64.  
  65. When you run stdemo.exe without parameters, it looks for the file 
  66. "script.txt" in the current working directory, and if it is there - 
  67. "plays" it. 
  68.  
  69. Also you may pass the name of the script as a parameter to stdemo.exe. 
  70. This name may include the full path.
  71.  
  72.  
  73. How to write a script?
  74. ======================
  75.  
  76. Script is a plain ASCII text file. It may include:
  77.  
  78. -    keystrokes;
  79. -    commands;
  80. -    interaction breaks;
  81. -    comments.
  82.  
  83. Every keystroke, command or interaction break is a unit. Stdemo Player 
  84. reads units from the script one by one and executes them. After one 
  85. unit is executed, Stdemo Player waits for some time (time-out tick, 
  86. which can be set or changed at any point in the script) and then 
  87. executes the next unit. Time-out doesn't affect the interaction breaks 
  88. (which are "text", "menu" and "input" dialog boxes). Once one of this 
  89. boxes is shown - only user may continue or stop script execution, 
  90. selecting "Continue" or "Stop" button on the box. 
  91. ( See below how to program "auto-continue" for interaction breaks.)
  92.  
  93. Comments are ignored, as you may expect, and cause no time-out delays.
  94.  
  95. 1. Keystrokes.
  96. --------------
  97.  
  98. Any text in the script which is not a command, interaction break or 
  99. comment is a set of keystrokes, i.e. every symbol of the text causes a 
  100. keystroke to be sent into the current window application (see  below).
  101. There are also several special symbols which allow to simulate 
  102. different keyboard keys.
  103.  
  104. Any keystroke can be preceded by one or more special symbols 
  105. ("@" - Alt, "#" - Shift or/and "%" - Control) as you see in the 
  106. following example:
  107.  
  108. @A    Alt-A
  109. #A    Shift-A
  110. %A    Ctrl-A
  111. #%A    Shift-Ctrl-A
  112.  
  113. There are also many special keys which are coded by "escaping" them 
  114. with the "]". They are follows:
  115.  
  116. ]|    Down
  117. ]^    Up
  118. ]<    Left
  119. ]>    Right
  120. ]~    Tab
  121. ]!    Return
  122. ]-    PgUp
  123. ]+    PgDn
  124. ]\    Backspace
  125. ]Z    Esc
  126. ]I    Ins
  127. ]D    Del
  128. ]H    Home
  129. ]E    End
  130. ]0    F10
  131. ]1    F1
  132. ...........
  133. ]9    F9
  134. ]]    ]
  135. ]@    @
  136. ]%    %
  137. ]#    #
  138. ]:    :
  139. ]$    $
  140.  
  141. This is not a full set of the keyboard keys, as you may note - but it 
  142. covers most of usable ones (I hope).
  143.  
  144. 2. Commands.
  145. ------------
  146.  
  147. All commands start from the colon sign ":". Some of the commands must 
  148. be coded as a separate line in a script, others can be mixed with the 
  149. keystrokes. The rule of a thumb is: if a command has fixed format or 
  150. ends with the special separator - it can be placed anywhere, otherwise 
  151. it has to be coded as a separate line of the script. The general format 
  152. of a command is:
  153.     :<code><parameters>
  154. <code> is a single letter or some other symbol;
  155. <parameters> may vary; one parameter can be a letter, text or number; 
  156. parameters follow the code without blank, and in some cases are 
  157. separated one from another by the special separator "|".
  158.  
  159. The commands are:
  160.  
  161. :=x            set time-out tick to x milliseconds.
  162.             Default time-out is 1 millisecond.
  163.  
  164.     Example:
  165.     :=1000    set time-out tick to 1 sec.
  166.  
  167. :T            skip 1 time-out tick.
  168.  
  169.     Example:
  170.     abc:T:T:Tefg    enter "abc", then wait for three 
  171.             current time-out ticks, then enter
  172.             "efg".
  173.  
  174. :Wx            delay script execution for x seconds
  175.  
  176. :Dtext        change current directory to "text". 
  177.  
  178.     Example:
  179.     :Dc:\windows\system
  180.  
  181. :(program_name parm|x    
  182.             launch the application;
  183.             program name must include extension (for the 
  184.             security reason) and may include the full path;
  185.             parameters to the program can be passed, if 
  186.             needed (not required);
  187.             flag x may be coded as one digit 0..2 after the 
  188.             separator and affects the size of the
  189.             application window: 0 (default), 1(maximize),
  190.             2(minimize).
  191.         
  192.         Note:
  193.             By deafult, Stdemo checks if the application
  194.             created active window, and if not - assumes
  195.             that something went wrong. This might create 
  196.             problems if the application you are going to start
  197.             doesn't create window at all, or create hidden
  198.             window. See :c command below which disables this check.
  199.     
  200.     Examples:
  201.     :(notepad.exe
  202.     :(c:\windows\write.exe demo.wri
  203.     :(notepad.exe c:\stdemo\readme.txt|2
  204.  
  205. :cX            enable/disable check on active window after the :( command;
  206.             parameter "X" must be coded as one digit:
  207.             0 - disable check, 1 - enable check.
  208.  
  209. :<caption string|x    find and activate/hide/destroy already running 
  210.             application;
  211.             flag x may be coded as one digit 0..2 after the 
  212.             separator and affects the size of the
  213.             application window: 0 (default), 1(maximize),
  214.             2(minimize), 3(hide), 4(destroy).
  215.     
  216.     Examples:
  217.     :<Notepad - (Untitled)|1
  218.  
  219. :)            kill the last application in stack (if exists).
  220.  
  221.     Note:    
  222.         Stdemo Player allows to start several applications.
  223.         It keeps track of the applications being started in 
  224.         the internal stack ( max. 50 entries). When you start
  225.         a new application, the following keystrokes will be 
  226.         sent into the new application window, as it will
  227.         get focus after the launch. You must issue ":)" -
  228.         kill last application - command, even when you finish
  229.         the application using it's menu commands - so that
  230.         Stdemo Player could handle the stack of current
  231.         applications properly.
  232.         You can switch focus from one application to another
  233.         using :< command or you can do this by simulating mouse 
  234.         clicking in the proper window. Just    make sure that you 
  235.         close applications in the reverse order as you started 
  236.         them, and issue correspondent ":)" commands in the same 
  237.         reverse order.
  238.         
  239. :Iab        enable/disable Windows input;
  240.             parameter "a" must be coded as one digit:
  241.             0 - disable input, 1 - enable input;
  242.             parameter "b" is also 1 digit:
  243.             0 - temporarily, 1 - permanently.
  244.     
  245.     Example:
  246.     :I10    enable input until the next interaction break.
  247.  
  248.     Note:    
  249.         When Stdemo starts, it disables Windows